package cn.cjxy.test;

import cn.cjxy.SpringBootMybatisApp;
import cn.cjxy.mapper.UserMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * 整合junit
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = SpringBootMybatisApp.class)
public class Demo1 {

    @Autowired
    private UserMapper userMapper;

    @Test
    public void demo1() {
        userMapper.findAll().forEach(System.out::println);
    }

}
